package com.wx.ssm.aop;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author shkstart
 * @create 2020-05-08 15:11
 */
public class TestAop {

    public static void main(String[] args) throws Exception {

        testAop();
    }

    public static void testAop() throws Exception {
        ApplicationContext conext = new ClassPathXmlApplicationContext("spring/spring-aop.xml");
        IStudentService studentService = (IStudentService) conext.getBean("studentService");
        Student student = new Student();
        student.setStuAge(23);
        student.setStuName("zs");
        studentService.addStudent(student);
        studentService.deleteStudentByNo(1);
    }
}
